break and jumping over the loop in JavaScript